<template>
	<w-container id="container">
		<!-- 自定义导航 -->
		<w-navbar id="navbarStyle" bgColor="#F5F5F5" leftIcon="back-btn" :titleStyle="{color:'#222'}" :title="navTitle"></w-navbar>
		<view class="conent bg-color-item">
			<u-parse :content='handleLang(activityRule)' style="color: #999;"></u-parse>
		</view>
	</w-container>
</template>

<script>
	import {
		getRankingList
	} from '@/api/common/index.js'
	import {
		themeinfo
	} from '@/api/compound/index.js';
	export default {
		data() {
			return {
				param: {
					type: 1
				},
				navTitle: '活动规则',
				search: {
					page: 1,
					types: 2,
					limit: 150
				},
				activityRule: ''
			};
		},
		onLoad(e) {
			this.param = e;
			this.getRules();
		},
		methods: {

			// 获取规则
			getRules() {
				// 1邀请活动 2合成规则 3水晶攻略
				switch (Number(this.param.type)) {
					case 1:
						getRankingList(this.search).then(res => {
							this.activityRule = res.data.activityRule;
						})
						break;
					case 2:
						this.activityRule = uni.getStorageSync('compound_rule_text');
						break;
					case 3:
						this.navTitle = '凤羽规则';
						this.activityRule = this.$store.state.config.info.strategy;
						break;
					case 4:
						this.navTitle = '活动规则'
						this.activityRule = uni.getStorageSync('draw-text');
						break;
					case 6:
						this.navTitle = '活动规则'
						this.activityRule = uni.getStorageSync('draw-text');
						break;	
				}
			}
		}
	}
</script>

<style lang="scss">
	#container {
		// background-image: url($IMG_URL + "/static/bg/my-bg.png");
		background-size: 750rpx auto;
		background-repeat: no-repeat;
		padding: 30rpx;
	}

	#navbarStyle /deep/ .u-navbar--fixed {
		// background-image: url('@/static/bg/my-bg.png');
		background-position: top;
		background-size: 100% auto;
	}

	.conent {
		width: 100%;
		min-height: 50vh;
		border-radius: 24rpx;
		padding: 40rpx;
	}
</style>